/**
*
*	\file swi.h
*	\author Nishant Agrawal
*	\brief
*	\date  Tuesday,October 27,2009
*	\version 1.0
*
*
*/
#ifdef __SWI__



void swi_init(void);
uint32_t swi_register(void (*func)(void *));


void __swi(0)	__SWI_0(void *ptr);
void __swi(1)	__SWI_1(void *ptr);
void __swi(2)	__SWI_2(void *ptr);
void __swi(3)	__SWI_3(void *ptr);
void __swi(4)	__SWI_4(void *ptr);
void __swi(5)	__SWI_5(void *ptr);
void __swi(6)	__SWI_6(void *ptr);
void __swi(7)	__SWI_7(void *ptr);
void __swi(8)	__SWI_8(void *ptr);
void __swi(9)	__SWI_9(void *ptr);
void __swi(10)	__SWI_10(void *ptr);
void __swi(11)	__SWI_11(void *ptr);
void __swi(12)	__SWI_12(void *ptr);
void __swi(13)	__SWI_13(void *ptr);
void __swi(14)	__SWI_14(void *ptr);
void __swi(15)	__SWI_15(void *ptr);


#define SWI_CALL(swi_number,ptr_void) do{		\
	switch(swi_number)							\
	{											\
		case 0:__SWI_0(ptr_void);break;			\
		case 1:__SWI_1(ptr_void);break;			\
		case 2:__SWI_2(ptr_void);break;			\
		case 3:__SWI_3(ptr_void);break;			\
		case 4:__SWI_4(ptr_void);break;			\
		case 5:__SWI_5(ptr_void);break;			\
		case 6:__SWI_6(ptr_void);break;			\
		case 7:__SWI_7(ptr_void);break;			\
		case 8:__SWI_8(ptr_void);break;			\
		case 9:__SWI_9(ptr_void);break;			\
		case 10:__SWI_10(ptr_void);break;			\
		case 11:__SWI_11(ptr_void);break;			\
		case 12:__SWI_12(ptr_void);break;			\
		case 13:__SWI_13(ptr_void);break;			\
		case 14:__SWI_14(ptr_void);break;			\
		case 15:__SWI_15(ptr_void);break;			\
	}											\
}while(0)


//void SWI_CallSwi(unsigned int swi_number);
#endif
